importPackage(Packages.org.bukkit);
importPackage(Packages.com.sk89q.worldguard.bukkit);

context.checkArgs(1,1,"<region>");

var pl = Bukkit.getPlayer(player.getName());
var w = pl.getWorld();
var rm = WGBukkit.getRegionManager(w);
var r = rm.getRegion(argv[1]);
if(r!=null){
  var v1 = r.getMinimumPoint();
  var loc = new Location(pl.getWorld(),v1.getX(),v1.getY(),v1.getZ());
  var b = w.getHighestBlockAt(loc);
  pl.teleport(b.getLocation().add(0.5,0,0.5));
}else{
  player.print("регион "+argv[1]+" не найден");
}

